package com.hjx.http.util;


import org.apache.http.protocol.HttpContext;

public class HttpContextFetchUtil {

    private static final ThreadLocal<HttpContext> httpContextThreadLocal = new ThreadLocal<HttpContext>();

    public static HttpContext getHttpContext(){
        return httpContextThreadLocal.get();
    }

    public static void setHttpContext(HttpContext httpContext){
        httpContextThreadLocal.set(httpContext);
    }

    public static void remove(){
        httpContextThreadLocal.remove();
    }
}
